﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace bkfexp {
    public partial class SetForm : Form {
        public SetForm(SetSel[] als) { this.als = als; InitializeComponent(); }

        SetSel[] als;

        public int Sel = -1;
        public bool Fast = true;

        private void SetForm_Load(object sender, EventArgs e) {
            foreach (SetSel s in als) {
                lbSet.Items.Add(s);
            }
            if (lbSet.Items.Count != 0)
                lbSet.SelectedIndex = 0;
        }

        private void lbSet_DoubleClick(object sender, EventArgs e) {
            buttonOK.PerformClick();
        }

        private void buttonOK_Click(object sender, EventArgs e) {
            if (lbSet.SelectedIndex < 0) return;
            Sel = lbSet.SelectedIndex;
            Fast = rbFast.Checked;
            Close();
        }
    }
}